<!--
 * @Author: lmk
 * @Date: 2021-11-24 15:03:13
 * @LastEditTime: 2021-12-04 02:38:35
 * @LastEditors: lmk
 * @Description: 
-->
<template>
	<view :class="currentTheme">
		<a-nabbar name="购票" />
		<view class="u-padding-32">
			<item-search @change="downCallback" placeholder="请搜索展会" v-model="form.name"></item-search>
		</view>
		<mescroll-body  @init="mescrollInit"  @down="downCallback"  @up="upCallback" :up="upOption">
			<flowLayout :list="dataList" v-if="dataList.length" :columnNum="2" @goBuy="goBuy"/>
		</mescroll-body>
	</view>
</template>

<script>
	import {
		add,
		getList
	} from '@/api/crud.js'
	import settlement from '@/mixins/settlement.js'
	// import empty from '@/components/mescroll-uni/components/mescroll-empty.vue'
	import flowLayout from './eiml-flow-layout.vue'
	import itemSearch from '@/components/itemSearch/itemSearch.vue'
	import upCallback from '@/mixins/upCallbackMixin.js'
	import searchMixins from '@/mixins/searchMixins.js'

	export default {
		mixins: [upCallback,searchMixins,settlement],
		components: {
			flowLayout,itemSearch
		},
		data() {
			return {
				form: {
					name:''
				},
				apiModule: 'shopApi',
				apiType: 'product',
				loading: false,
				dataList: [],
				type:'ticket',
				name: "ticketQuery",
				oldList:[]
			};
		},
		onLoad() {

		},
		computed: {
			upOption(){}
		},
		methods: {
			goBuy(item) {
				this.loginValidate().then(res => {
					this.settlement([{
						productId: item.id,
						productNum: 1
					}])
				})
			},
		},
	}
</script>

<style lang="scss" scoped>

</style>
